Welcome to Checksum for the Macintosh, a complete file checksum program. Checksum is a program that allows anyone to quickly and easily calculate file checksums. Briefly, a checksum is a number calculated for a file by performing some operation on all the characters in the file, such as adding up all the character values and generating a total. A checksum is useful for testing the integrity of a file — the calculated checksum can either be compared against a previously calculated checksum, or the checksum can be compared against a checksum for a file on another computer. Checksum is the easiest way to compare two files on Macintosh computers (either on the same machine or different ones), to tell if they are identical or not! If the checksum values match, there is an extremely good chance the files are identical. The choice of checksum algorithm affects the chance that two files are identical if their checksums match.
Some of the key features of Checksum are:
• Most popular checksum algorithms are supported
• Checksum is compatible with most checksum programs on other systems, e.g., the Unix “sum” program and the POSIX.2 “cksum”
• Checksum can specially treat ‘TEXT’ file end-of-line characters to be compatible with Unix or MS-DOS systems
• Checksum is fully System 7 and 32 bit addressing compatible, including balloon help and “drag and drop”
• Checksum is business-ware — free for individuals and for education, but organizations must pay if they use it
The results from Checksum are displayed in a window on the screen. Results can be copied to the Clipboard to use in other applications.
Checksum will run on a Mac Plus or later. System 6 or System 7 is required.
Apple and Macintosh are registered trademarks of Apple Corp.
Unix™ is a registered trademark of Unix System Laboratories, Inc.
MS-DOS® is a registered trademark of Microsoft Corp.
Sun OS and Solaris are registered trademarks of Sun Microsystems
The MD5 Message-Digest Algorithm is by RSA Data Security, Inc.
All other trademarks held by their respective owners
Please read this license carefully before keeping this software. By keeping and/or using the software, you are agreeing to be bound by the terms of this license. If you do not agree to the terms of this license, you are not authorized to use this software and must delete it. Use and distribution of this software is governed by the following terms to reasonably ensure this software will remain freely available and that no one other than the author will derive a commercial benefit from distributing this software.
“You,” “your,” and the “user” refers to any person or entity which acquires or uses this software.
“Software,” “program” and “application” refers to any computer programs identified at the start of this documentation file, together with all codes, techniques, software tools, formats, designs, concepts, methods, ideas and documentation associated with the computer program(s). The term also includes all copies of any part of the software and documentation.
“Author” refers to the author of this software, Geoff Walsh.
License: The application and documentation accompanying this License, whether on disk, in read only memory, or on any other media is licensed to you by the author. This software is owned by the author and contains valuable and proprietary information of the author. You own the disk on which the software is recorded.
This Checksum program for the Apple Macintosh, and its accompanying documentation, is distributed as businessware. It is freeware for personal use on a single CPU and for educational institutions to use for instructional uses. However, it must be licensed for use within a business, corporation or organization. This includes government agencies. The license fee is $5 U.S. for each computer on which the application is used.
If you are a shareware distributor, you may distribute this software as long as you contact the author for permission first. You must distribute all of the files intact and in unmodified form, and may not charge more than a reasonable disk copying fee.
This software must be registered using the accompanying registration form and paying the appropriate businessware fees. Individuals using the software for personal use and educational institutions are encouraged to register their copies so they can be informed of future updates.
Restrictions: This software and documentation contains copyrighted material, trade secrets and other proprietary material and in order to protect them you may not reverse engineer, decompile, disassemble or otherwise attempt to convert the software to a human-perceivable form. You may not modify, network, rent, lease, loan, distribute or create derivative works based upon this software in whole or in part.
Termination: This License is effective until terminated. You may terminate this License at any time by destroying the software and related documentation and all copies thereof. This License will terminate immediately without notice if you fail to comply with any provision of this License. Upon termination you must destroy the software and related documentation and all copies thereof in your possession and cease distributing the same.
U. S. Government Restricted Rights: This software is provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the government is subject to restrictions set forth in subparagraph (b)(3)(ii) of The Rights in Technical Data and Computer Software clause at 252.227-7013. Manufacturer is Geoff Walsh, P. O. Box 10, Malibu, California 90265-0010.
Disclaimer of Warranty on Software: You expressly acknowledge and agree that use of this software is at your sole risk. The software and related documentation are provided “AS IS” and without warranty of any kind and the author expressly disclaims all warranties, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The author does not warrant that the functions contained in the software will meet your requirements, or that the operation of the software will be uninterrupted or error-free, or that defects in the software will be corrected. Furthermore, the author does not warrant or make any representations regarding the use or the results of the use of the software or related documentation in terms of their correctness, accuracy, reliability, or otherwise. No oral or written information or advice given by the author shall create a warranty or in any way increase the scope of this warranty. Should the software prove defective, you assume the entire cost of all necessary servicing, repair or correction. Some states do not allow the exclusion of implied warranties, so the above exclusion may not apply to you.
Although the author would appreciate any feedback or bug reports, the author shall not be responsible for correcting any problems which you discover or otherwise help you maintain and use this software. Furthermore, the author may at any time replace, modify, alter, improve, enhance or change this software.
Limitation of Liability: Under no circumstances, including negligence, shall the author be liable for any incidental, special or consequential damages that result from the use or inability to use this software or related documentation, even if the author has been advised of the possibility of such damages. Some states do not allow the limitation or exclusion of liability for incidental or consequential damages so the above limitation or exclusion may not apply to you.
Controlling Law and Severability: This License shall be governed by and construed in accordance with the laws of the United States and the State of California, as applied to agreements entered into and to be performed entirely within California between California residents. If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License shall be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this License shall continue in full force and effect.
Complete Agreement: This License constitutes the entire agreement between the parties with respect to the use of this software and related documentation, and supersedes all prior or contemporaneous understandings or agreements, written or oral, regarding such subject matter. No amendment to or modification of this License will be binding unless in writing and signed by a duly authorized representative of the author.
The status window is used to display the checksum results. The status window is fully movable and resizable. The display can be scrolled if more information is present than will fit within the window. The status window can only be written by the checksum program — the keyboard cannot add to or modify its contents. However, any information in the status display window can be selected and copied to the Macintosh clipboard.
The status window will appear like:
The calculated checksum value is the result as a decimal number. This is what the Checksum application calculates when a file is opened. If a CRC algorithm is used, the result is also shown as a hexadecimal (base 16) value in parentheses.
The block count is the number of blocks in the file. This field is mostly for compatibility with the Unix sum program. If the System V checksum algorithm is used, the block size is 512 bytes; for all other checksum algorithms, the block size is 1024 bytes.
The byte count is the number of bytes processed during the checksum calculation. Note that this may not be the same as the number of bytes in the file, depending on which file forks are selected and whether ‘TEXT’ file end-of-line translation is set to MS-DOS.
The file name is simply the name of the file opened.
Here are some possible ways to use Checksum:
1. Compare 2 files to determine whether they are the same or not.
Calculate the checksum for each file and compare the results. The files can be on the same system, on different disks, or on two totally different machines (possibly even in different countries). If the checksum for each file is the same, the files are probably the same.
Make sure the same checksum algorithm is used on both files. For best results, use any one of the 32-bit CRC options. Also, make sure that both Data fork and Resource fork options are selected.
Both files don’t even have to be on Macintosh systems. For example, if one of the files is on a Unix system, the “sum” command can be used to calculate a checksum for one of the files.
2. Determine whether a file has changed over time.
If there is a file which may change over time, calculate the checksum for the file and permanently record the results (e.g., with the Save As… option). When you need to determine whether the file has changed, re-calculate the checksum for the file and compare the two calculated values.
3. Calculate the checksum for an entire directory (System 7 users only)
Select all the files in the directory, drag the selected files and drop onto the Checksum program icon, using System 7’s “drag and drop” capability. Checksum will calculate the checksum for all files selected. Note that files can be selectively chosen, and even subfolders contents can be selected in an expanded outline view.
The File menu contains all the commands usually associated with opening and saving files:
New will open a new status display window. Only one status display window can be open at a time.
Open… will open a file and calculate a checksum. Results are presented in the status window. A status window must be active in order to open files to calculate checksums.
Close will close the status window.
Save As… will save the results in the status window to a file. The file will be a text file which can be opened by an application such as TeachText.
Quit will quit the Checksum application.
Page Setup… and Print… aren’t implemented in this version of Checksum. If you need to print Checksum results, Copy the status window display to the clipboard, Paste into TeachText, a word processor or text editor, and print.
The Edit menu contains the commands associated with the Macintosh clipboard.
Copy will copy the selected text to the clipboard.
Select All will select all the results in the status window. The Copy command must still be used to copy all the text to the clipboard.
The Preferences… menu option provides a dialog which lets you choose specific options depending on your needs. The default settings match Checksum version 1.0 performance.
Show full pathnames will provide the complete path description for a file, instead of just the base filename.
Report file forks separately will calculate checksums for each file fork independently and report two separate values. Note that if ‘TEXT’ special has been selected, both file forks will be reported, but only the data fork will have its end-of-line character optionally translated. The data fork is calculated before the resource fork.
Show file size in blocks will optionally report the block count as in version 1.0. Similarly, Show file size in bytes will optionally report the number of bytes in the file. If Report file forks separately is selected, separate block and/or byte counts will be reported for each file fork.
Report throughput will report the approximate performance of the checksum algorithm for your system. Many factors will affect checksum throughput: processor speed, disk I/O performance, operating system and extensions, and disk cache settings. For best results, very large files will give the most accurate measurements of actual performance, but results should be averaged over a large number of files to get a meaningful measure for comparison purposes. The value reported has little worth on its own.
Undo, Cut, Paste and Clear are not valid menu options, but are included for compatibility with desk accessories.
The Options menu controls how the checksum is calculated. The default settings should provide maximum compatibility with the Unix “sum” utility.
System V will use the original AT&T Bell Labs checksum algorithm. This is not a very “strong” checksum method, i.e., the chance of identical checksums for different files is greater than for other algorithms. This algorithm is provided mainly for compatibility with System V Unix implementations.
BSD will use the checksum algorithm traditionally found on Berkeley 4.x based Unix systems (e.g., Sun OS/Solaris). On System V Unix implementations, the “sum -r” command will usually produce the same values as this option.
CRC will use a stronger algorithm than either the System V or BSD options. Cyclic Redundancy Check (CRC) checksums are a family of algorithms. The “CRC Options” submenu is active only when CRC is selected. The “CRC Options” submenu determines which CRC algorithm is used.
The RSA MD5 checksum option is a complete implementation of the RSA Data Security, Inc. MD5 Message-Digest Algorithm. A message digest algorithm is a cryptographic checksum that ensures even a small change in the input file results in a large change in the calculated checksum. MD5 generates a 128-bit (16 byte) “signature” for any given file. MD5 is near the state of the art for cryptographic checksum algorithms. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. A complete technical description of the MD5 algorithm can be found in Internet RFC 1321.
Data Fork will calculate a checksum value which includes the file’s data fork.
Resource Fork will calculate a checksum value which includes the file’s resource fork. For consistency between files, the Finder Information portion of the resource fork (bytes 16 to 127) is ignored in the checksum calculation.
Note: when both “Data Fork” and “Resource Fork” are selected, the file is treated as one contiguous file, with the file’s data fork immediately followed by the file’s resource fork. This is not the same as MacBinary format.
‘TEXT’ special determines whether files of type ‘TEXT’ will be treated specially. If ‘TEXT’ special is selected, the Macintosh end-of-line character (carriage return, ASCII value 13, hexadecimal value 0D) will possibly be treated special for ‘TEXT’ files and only the data fork will be used, even if “Resource Fork” is selected. The end-of-line character will be treated as selected in the “End-of-line mode” submenu.
The CRC Options submenu determines which CRC algorithm is used when CRC is selected from the Options menu. Although the 32 bit CRC methods use the same polynomial, initial values are different, which accounts for different results.
CRC 16 is the 16 bit CRC algorithm found in applications such as ARC. The CRC polynomial used is:
CCITT 16 is the 16 bit CRC algorithm defined by the CCITT international standards group. (CCITT is the Consultive Committee for International Telephone and Telegraph — a standards organization that sets standards for worldwide voice and data communications.) The CRC polynomial used is:
Zip 32 is the 32 bit CRC algorithm used in the Zip, Compact Pro and Brik applications. The CRC polynomial used is:
POSIX.2 is the 32 bit CRC algorithm defined for use in the POSIX.2 “cksum” utility. The CRC polynomial used is:
The POSIX.2 CRC algorithm is slightly different from the other CRC algorithms, although the CRC polynomial is the same.
CCITT 32 is the 32 bit CRC algorithm defined by the CCITT international standards group. The CRC polynomial used is:
The Custom 16, Custom 32 and Define… commands aren’t implemented in this version. When implemented, they will support custom CRC calculations.
Many people has asked about the CRC calculation algorithms used in Checksum. For any CRC polynomial, four values define the calculation: the CRC polynomial coefficients, the initial value, the byte ordering, and number of bits in the result. The following table shows the information that describes the algorithms in Checksum:
Coefficients is the polynomial coefficients represented as a bit-map (in hexadecimal). For example, 0xA001 is the polynomial
(note the “+1” is always implied).
Note that the POSIX.2 algorithm differs slightly from the CCITT algorithm, even though the polynomials are the same.
The End-of-line mode submenu determines how the end-of-line character (carriage return) will be treated when a ‘TEXT’ file is opened if “‘TEXT’ special” has been selected from the Options menu. This will allow ‘TEXT’ files transferred from another operating system to give the same checksum on the Macintosh, even though some end-of-line conversion may have taken place.
Macintosh (CR) treats the end-of-line character as is, i.e., there is no conversion.
Unix (LF) treats end-of-line characters as a newline character (decimal 10, hexadecimal 0A), instead of as a carriage return. The normal Unix end-of-line character is a line feed.
MS-DOS (CR LF) treats end-of-line characters as a carriage return and line feed pair. This is the normal MS-DOS end-of-line convention.
Version 1.0 released March 1993. Initial release.
Version 1.1 released March 1994. RDA MD5 added, Preferences for display added, improved performance slightly, all known bugs (minor) fixed, and more keyboard functions supported. There are many changes internally to support future upgrades.
Version 1.1.1 released June 1994. Two minor bugs fixed: version 1.0 preferences are now read correctly, and the application now quits properly when settigs have been changed.
This is version 1.1.1 of Checksum. Depending on support and user feedback, it will be enhanced and maintained.
Some of the planned enhancements include:
Printing
Custom CRC definition and calculation
Calculating checksums for all files in a folder, not just individual files
Improved user interface for results display
Support for AppleScript and Apple Events
Saving calculated checksums in a reference file for automated comparison to validate file integrity.
Please send suggestions for improvements you would like to see.
Verify that you have a good copy of the program. When you receive Checksum and do Get Info from the Finder’s File menu, you should see:
In its default configuration, Checksum version 1.1.1 will calculate a checksum for itself which should be:
54125 46 blocks, 46508 bytes “Checksum”
If your results don’t match this, your copy has been modified and is not valid.
If you have already been using the checksum program, make sure you are using the correct configuration. Remove the “Checksum Preferences” file in your System Folder (System 6) or System Folder’s Preferences folder (System 7).
Checksum has been tested on most Macintosh models running both System 6 and System 7 and is 32-bit clean. If you encounter problems, try restarting your computer will all INITs and Extensions disabled. If the problem persists, please contact me. For correspondence by U.S. mail, use:
Geoff Walsh
P. O. Box 10
Malibu, CA 90265-0010
For electronic correspondence through the Internet, use: gpw@cerf.net